@echo off

call _baseinclude

set START_TIME=%TIME%
set PARAMS=-low -game "%ESTRANGED%"
set MAP=%~1
set SEP=----------------------------------------

echo.
echo Estranged Map Compiler
echo %SEP%

echo.
echo.

echo VBSP
echo %SEP%
"%SOURCE_2013%\bin\vbsp" %PARAMS% "%MAP%"

echo.
echo.

echo VVIS
echo %SEP%
"%SOURCE_2013%\bin\vvis" %PARAMS% "%MAP%"

echo.
echo.

echo VRAD
echo %SEP%
"%SOURCE_2013%\bin\vrad" %PARAMS% -both -StaticPropPolys -StaticPropLighting -textureshadows -lights estranged.rad "%MAP%"

echo.
echo.

echo Copying Map
echo %SEP%
copy "%MAP%.bsp" "%ESTRANGED%\maps"

echo.
echo.

echo Map compile finished
echo %SEP%

echo.
echo.

echo Started:  %START_TIME%
echo Finished: %TIME%

echo.
echo.

pause
exit
